﻿<controls:ChildWindow xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"   
    x:Class="IndexMarkSilverlightClient.ErrorWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:viewmodel="clr-namespace:IndexMarkSilverlightClient.Views"                      
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"             
    xmlns:common="clr-namespace:System.Windows;assembly=System.Windows.Controls"
    Title="Ошибка">
    
    <Grid x:Name="LayoutRoot" Width="640" Background="{StaticResource ContentPanelBackgroundColorBrush}">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Vertical">
		    <TextBlock Grid.Row="0" Margin="0" Text="Была обнаружена неизвестная ошибка" FontWeight="ExtraBold" FontSize="13"/>
		    <TextBlock Grid.Row="0" Margin="0" TextWrapping="Wrap" Text="Пожалуйста, обновите страницу браузера, нажав клавишу F5, или обратитесь к администратору для получения дополнительной информации." FontWeight="Bold" />
		</StackPanel>

        <StackPanel x:Name="ContentStackPanel" Grid.Row="2" Margin="0,8,0,0">
            <TextBlock x:Name="LabelText" TextWrapping="Wrap" Margin="0,0,0,2" Text="Описание ошибки"/>
            <TextBox x:Name="ErrorTextBox" Text="{Binding Exc, Source={StaticResource ErrorViewModel}}" TextWrapping="Wrap" IsReadOnly="True" VerticalScrollBarVisibility="Disabled"/>
            <controlsToolkit:Expander ToolTipService.ToolTip="Открыть детальное описание ошибки" ExpandDirection="Down" Header="Детали" Margin="0,0,0,2" Width="640" BorderThickness="0" BorderBrush="Transparent">
                <controls:TreeView MaxHeight="250" x:Name="ErrorTreeView" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
            </controlsToolkit:Expander>
		</StackPanel>


        <Button x:Name="OKButton" Grid.Row="3" Click="OKButton_Click" 
            Width="75" Height="23" HorizontalAlignment="Right" Margin="0,10,0,0" 
            TabIndex="0" Content="OK"/>

    </Grid>

</controls:ChildWindow>